package com.gagakuai.demo.aop.early;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

/*
 * @program: settement
 * @description:
 * @author: houhong
 * @create: 2022-11-13 16:08
 */
public class EarglyLogAspect implements MethodBeforeAdvice {


    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        String methodName = method.getName();
        System.out.println(methodName);

        System.out.println("执行目标方法:[" + methodName + "]" +
                "前置入参:" + Arrays.asList(args));
    }
}